import OptionalFieldsNote from './_optionalFieldsNote.mdx'

<OptionalFieldsNote />

Each picked file is represented by an object with the following properties:

| Name                     | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| :----------------------- | :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `uri`                    | `string`             | The URI of the picked file. Note that it is encoded, so you might need to [decode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) it for further processing.                                                                                                                                                                                                                                                                                                             |
| `name`                   | `string` \| `null`   | The name of the picked file, including the extension. It's very unlikely that it'd be `null` but in theory, it can happen.                                                                                                                                                                                                                                                                                                                                                                                            |
| `size`                   | `number` \| `null`   | The size of the picked file in bytes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `type`                   | `string` \| `null`   | The MIME type of the picked file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `hasRequestedType`       | `boolean`            | Android: Some [Document Providers](https://developer.android.com/guide/topics/providers/content-provider-basics) on Android (especially those popular in Asia, it seems) do not respect the request for [limiting selectable file types](./limiting-selectable-files.md). `hasRequestedType` will be false if the user picked a file that does not match one of the requested types. You need to do your own post-processing and display an error to the user if this is important to your app. Always `true` on iOS. |
| `error`                  | `string` \| `null`   | Error in case the file metadata could not be obtained.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `isVirtual`              | `boolean` \| `null`  | Android: Whether the file is a virtual file (such as Google docs or sheets). Will be `null` on pre-Android 7.0 devices. On iOS, it's always `false`.                                                                                                                                                                                                                                                                                                                                                                  |
| `convertibleToMimeTypes` | `string`[] \| `null` | Android: The target types to which a virtual file can be converted. Useful for `keepLocalCopy`. This field is only specified if `isVirtual` is true, and only on Android 7.0+. Always `null` on iOS.                                                                                                                                                                                                                                                                                                                  |
| `nativeType`             | `string` \| `null`   | The "native" type of the picked file: on Android, this is the MIME type. On iOS, it is the UTType identifier.                                                                                                                                                                                                                                                                                                                                                                                                         |
